package platformer.view.sprites.states;

public abstract class AnimationState
{
	protected int X;
	protected int Y;
	protected int frames;
	
	private void init(int X, int Y, int frames) {
		this.X = X;
		this.Y = Y;
		this.frames = frames ;
	}
	
	public AnimationState(int X, int Y, int frames ) {
		init( X, Y, frames );
	}	

	public int getX()
	{
		return X;
	}

	public int getY()
	{
		return Y;
	}

	public int getFrames()
	{
		return frames;
	}
	
	public AnimationState getIdle() {
		return this;
	}
	
	public boolean flipHorizontal() {return false;}
	
	public boolean flipVertical() {return false;}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AnimationState other = (AnimationState) obj;
		if (X != other.X)
			return false;
		if (Y != other.Y)
			return false;
		if (frames != other.frames)
			return false;
		if(this.flipHorizontal() != other.flipHorizontal())
			return false;
		if(this.flipVertical() != other.flipVertical())
			return false;
		
		return true;
	}
}
